#ifndef ConstBufferSequence_h__
#define ConstBufferSequence_h__
#include <boost/asio.hpp>
#include <vector>
#include <boost/shared_ptr.hpp>
#include "../Common/ArrayBuffer.h"

class ConstBufferSequence
{
public:
	ConstBufferSequence(void);
	~ConstBufferSequence(void);

	typedef boost::asio::const_buffer value_type;
	typedef std::vector<boost::asio::const_buffer>::const_iterator const_iterator;

	const const_iterator begin() const {
		return m_const_buffers.begin();
	}

	const const_iterator end() const {
		return m_const_buffers.end();
	}

	void clear();

	bool empty()
	{
		return m_const_buffers.empty();
	}

	void pushData(const ArrayBuffer* buffer);

private:
	std::vector<boost::asio::const_buffer> m_const_buffers;
	boost::shared_ptr<std::vector<const ArrayBuffer*> > m_array_buffer;

};


#endif // ConstBufferSequence_h__


